package net.sx.minemodule.mvp.activities;

import android.os.Bundle;
import android.support.v4.app.Fragment;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.homegoods.aroutercomment.ARouterPath;
import com.kedll.library.base.MyBaseFragmentActivity;
import com.kedll.library.mvp.BasePresenter;
import com.kedll.library.util.MyUtils;

import net.sx.minemodule.R;
import net.sx.minemodule.databinding.MineActivityMineCollectBinding;
import net.sx.minemodule.mvp.fragments.MineAnchorCollectFragment;
import net.sx.minemodule.mvp.fragments.MineGoodCollectFragment;
import net.sx.minemodule.mvp.fragments.MineStylistCollectFragment;
import net.sx.minemodule.mvp.fragments.MineVideoCollectFragment;

import java.util.ArrayList;
import java.util.List;

/**
 * 我的收藏
 * @author 11470
 */
@Route(path = ARouterPath.PATH_MINE_COLLECT)
public class MineCollectActivity extends MyBaseFragmentActivity<MineActivityMineCollectBinding,BasePresenter> {


    @Override
    protected int getLayout() {
        return R.layout.mine_activity_mine_collect;
    }

    @Override
    protected void initToolBar(Bundle savedInstanceState) {
        super.initToolBar(savedInstanceState);
        setTitle("我的收藏");

        String[] titles = getResources().getStringArray(R.array.mine_collect_tab_name);
        List<Fragment> fragments = new ArrayList<>();
        //主播
        MineAnchorCollectFragment anchorCollectFragment = new MineAnchorCollectFragment();
        //商品
        MineGoodCollectFragment goodCollectFragment = new MineGoodCollectFragment();
//        //设计师
//        MineStylistCollectFragment stylistCollectFragment = new MineStylistCollectFragment();
        //短视频
        MineVideoCollectFragment videoCollectFragment = new MineVideoCollectFragment();
        fragments.add(goodCollectFragment);
        fragments.add(anchorCollectFragment);
//        fragments.add(stylistCollectFragment);
        fragments.add(videoCollectFragment);
        mBinding.viewPager.setOffscreenPageLimit(titles.length);
        mBinding.viewPager.setPagingEnabled(false);
        mBinding.viewPager.setCurrentItem(0);
        MyUtils.bindViewPagerAndTabLayout(getSupportFragmentManager(), fragments, titles, mBinding.viewPager, mBinding.tabLayout);
    }

    @Override
    protected void initEvent() {

    }

    @Override
    protected BasePresenter getPresenter() {
        return null;
    }
}
